<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false" %>
<!doctype html>
<html lang="zh-cn">
<head>
    <title>登陆...</title>
    <meta charset="UTF-8"/>
    <script src="${pageContext.request.contextPath}/static/jquery-3.4.1.min.js"></script>

    <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>

    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script>
        $(function () {
            $.getJSON("/hibernate/user/listAjax",e=>{
                e.forEach((e)=>{
                    $(".table tbody").append("<tr>\n" +
                        "                    <td>"+e.name+"</td>\n" +
                        "                    <td>"+e.mobile+"</td>\n" +
                        "                    <td>"+e.address+"</td>\n" +
                        "                </tr>")
                })
            })
        })
    </script>
</head>
<body>
    <div class="root">
        <jsp:include page="header.jsp" />
        <div class="pricing-header px-3 py-3 pt-md-5 pb-md-4 mx-auto text-center">
            <h4>用户管理</h4>
            <h5 style="color: red">${sessionScope.msg}</h5>
            <c:remove var="msg" scope="session" />
        </div>

        <div class="container">
            <table class="table">
                <thead>
                <tr>
                    <th>name</th>
                    <th>mobile</th>
                    <th>address</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
        </div>

</body>
</html>
